package com.example.tests;

import org.testng.Assert;
import org.testng.annotations.Test;
import com.example.fw.Contact;

public class ContactCreationTests extends TestBase {

        @Test
        public void createValidContact() {
                Contact contact = new Contact().withFirstName("tester").withLastName("tester");
                app.getContactHelper().createContact(contact);
                Contact createdContact = app.getContactHelper().getFirstContact();
                Assert.assertEquals(contact, createdContact);
        }
        
        @Test
        public void createValidContactWithEmptyLastname() {
                Contact contact = new Contact().withFirstName("tester").withLastName("");
                app.getContactHelper().createContact(contact);
                Contact createdContact = app.getContactHelper().getFirstContact();
                Assert.assertEquals(contact, createdContact);
        }

}